$(document).ready(function () {

    $('#btn').click(function () {
        $("#linguetta_next div").each(function (i) {
            var el = $(this);
            setTimeout(function () {
                el.fadeIn(300);
            }, i * 20)
        });
    });
/*

$(".addpaire").each(function(){
      if($(this).children(':odd').length > 0){
        $(this).children(':odd').addClass('paire');
      }
});

(:eq(), :lt(), :gt(), :even, :odd)

$('.add_first :first-child').addClass('first');
$('.add_last :last-child').addClass('last');
$(".add_impaire tr:even").addClass('impraire') ;
$(".add_paire tr:odd").addClass('paire');
$('.count_2 li:nth-child(3n+3)').addClass("troisieme");
$('.count_2 li:nth-child(-n+3)').addClass("troi_premier");
$('.count_2 li:nth-last-child(-n+3)').addClass("troi_dernier");
*/
    /*$(this).closest("tr").toggleClass("sdfssdf")cible element au parent*/

    //$('.grid-text p').dotdotdot();

    /*mots = $('h2').text().split(' ');
  ph= mots.join(' - ');
  $("h3").text(ph);*/




    /*$("table td:first-child,table th:first-child ").addClass("first");
$("table td:last-child,table th:last-child ").addClass("last");*/

    /* $(".count_2 li").each(function(a, b){
        if(a%3 == 0){
            $(b).addClass("troisiem");
        }
    });*/



    /*$(".newsTitle a").each(function(i){
    var len=$(this).text().length;
    if(len>40) // If more than 35 characters then..
    {
      $(this).text($(this).text().substr(0,40)+'...'); // then add ...
      }
    });*/

    /*var height_block = new Array();
	Array.max = function( array ){
    return Math.max.apply( Math, array );
	};
	$(".BlocXtMiddle").each(function(){
		height_block.push($(this).height());
	});
	$(".BlocXtMiddle").height(Array.max(height_block));     */
    /*add class li ul td*/
	
	
	/*egal height*/
	var currentTallest = 0,
     currentRowStart = 0,
     rowDivs = new Array(),
     $el,
     topPosition = 0;

	$('.blocks').each(function() {
	   $el = $(this);
	   topPostion = $el.position().top;
	   if (currentRowStart != topPostion) {
		 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
		   rowDivs[currentDiv].height(currentTallest);
		 }
		 rowDivs.length = 0;
		 currentRowStart = topPostion;
		 currentTallest = $el.height();
		 rowDivs.push($el);
	   } else {
		 rowDivs.push($el);
		 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
	  }
	   for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
		 rowDivs[currentDiv].height(currentTallest);
	   }
	 });​
	 
	 /*egal height*/
	 function equalHeight(group) {
		var tallest = 0;
		group.each(function() {
			var thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}
	equalHeight($(".CV_PhotoEse"));
	
});